/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "etc_ecardresult")
public class EtcEcardresult extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "EtcEcardresult";
	public static final String ALIAS_ECARDRESULT_ID = "主键ID";
	public static final String ALIAS_BANK_TYPE = "银行代码";
	public static final String ALIAS_TRACKCODE = "跟踪代码";
	public static final String ALIAS_VER = "版本号";
	public static final String ALIAS_REQUESTID = "请求流水号";
	public static final String ALIAS_REQUESTTIME = "请求时间戳";
	public static final String ALIAS_APPROVALRESULT = "批核结果：1通过，2拒绝";
	public static final String ALIAS_SERIALNUM = "合作方流水号";
	public static final String ALIAS_ATTACH = "附加数据";
	 
	@Id
	@Column(name = "ecardresult_id")
	private String ecardresult_id;
	@Column(name = "bank_type")
	private String bank_type;
	@Column(name = "trackcode")
	private String trackcode;
	@Column(name = "ver")
	private String ver;
	@Column(name = "requestid")
	private String requestid;
	@Column(name = "requesttime")
	private String requesttime;
	@Column(name = "approvalresult")
	private String approvalresult;
	@Column(name = "serialnum")
	private String serialnum;
	@Column(name = "attach")
	private String attach;
	//columns END

	public EtcEcardresult(){
	}

	public EtcEcardresult(
		String ecardresult_id
	){
		this.ecardresult_id = ecardresult_id;
	}

	/**  
	 * 设置主键ID  
	 * @param ecardresult_id 主键ID  
	 */  
	public void setEcardresult_id(String ecardresult_id) {
		this.ecardresult_id = ecardresult_id;
	}
	
	/**  
	 * 获取主键ID   
	 * @return ecardresult_id 主键ID   
	 */
	public String getEcardresult_id() {
		return this.ecardresult_id;
	}
	/**  
	 * 设置银行代码  
	 * @param bank_type 银行代码  
	 */  
	public void setBank_type(String bank_type) {
		this.bank_type = bank_type;
	}
	
	/**  
	 * 获取银行代码   
	 * @return bank_type 银行代码   
	 */
	public String getBank_type() {
		return this.bank_type;
	}
	/**  
	 * 设置跟踪代码  
	 * @param trackcode 跟踪代码  
	 */  
	public void setTrackcode(String trackcode) {
		this.trackcode = trackcode;
	}
	
	/**  
	 * 获取跟踪代码   
	 * @return trackcode 跟踪代码   
	 */
	public String getTrackcode() {
		return this.trackcode;
	}
	/**  
	 * 设置版本号  
	 * @param ver 版本号  
	 */  
	public void setVer(String ver) {
		this.ver = ver;
	}
	
	/**  
	 * 获取版本号   
	 * @return ver 版本号   
	 */
	public String getVer() {
		return this.ver;
	}
	/**  
	 * 设置请求流水号  
	 * @param requestid 请求流水号  
	 */  
	public void setRequestid(String requestid) {
		this.requestid = requestid;
	}
	
	/**  
	 * 获取请求流水号   
	 * @return requestid 请求流水号   
	 */
	public String getRequestid() {
		return this.requestid;
	}
	/**  
	 * 设置请求时间戳  
	 * @param requesttime 请求时间戳  
	 */  
	public void setRequesttime(String requesttime) {
		this.requesttime = requesttime;
	}
	
	/**  
	 * 获取请求时间戳   
	 * @return requesttime 请求时间戳   
	 */
	public String getRequesttime() {
		return this.requesttime;
	}
	/**  
	 * 设置批核结果：1通过，2拒绝  
	 * @param approvalresult 批核结果：1通过，2拒绝  
	 */  
	public void setApprovalresult(String approvalresult) {
		this.approvalresult = approvalresult;
	}
	
	/**  
	 * 获取批核结果：1通过，2拒绝   
	 * @return approvalresult 批核结果：1通过，2拒绝   
	 */
	public String getApprovalresult() {
		return this.approvalresult;
	}
	/**  
	 * 设置合作方流水号  
	 * @param serialnum 合作方流水号  
	 */  
	public void setSerialnum(String serialnum) {
		this.serialnum = serialnum;
	}
	
	/**  
	 * 获取合作方流水号   
	 * @return serialnum 合作方流水号   
	 */
	public String getSerialnum() {
		return this.serialnum;
	}
	/**  
	 * 设置附加数据  
	 * @param attach 附加数据  
	 */  
	public void setAttach(String attach) {
		this.attach = attach;
	}
	
	/**  
	 * 获取附加数据   
	 * @return attach 附加数据   
	 */
	public String getAttach() {
		return this.attach;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ecardresult_id",getEcardresult_id())
			.append("bank_type",getBank_type())
			.append("trackcode",getTrackcode())
			.append("ver",getVer())
			.append("requestid",getRequestid())
			.append("requesttime",getRequesttime())
			.append("approvalresult",getApprovalresult())
			.append("serialnum",getSerialnum())
			.append("attach",getAttach())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getEcardresult_id())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof EtcEcardresult == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcEcardresult other = (EtcEcardresult)obj;
		return new EqualsBuilder()
			.append(getEcardresult_id(),other.getEcardresult_id())
			.isEquals();
	}
}

